package cn.yshujia.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author YShuJia
 * @create 2024/4/23
 * @description 实体
 */

@Data
@TableName ("t_router")
@Schema (name = "Router", description = "")
public class Router implements Serializable {
	@Serial
	private static final long serialVersionUID = 1L;
	
	@Schema(description = "主键（自增）")
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;
	
	@Schema(description = "权限ID 向下兼容")
	@TableField("role_id")
	private Long roleId;
	
	@Schema(description = "路由标题")
	@TableField("title")
	private String title;
	
	@Schema(description = "路由层级")
	@TableField("`level`")
	private Integer level;
	
	@Schema(description = "路由name")
	@TableField("`name`")
	private String name;
	
	@Schema(description = "优先级")
	@TableField("priority")
	private Long priority;
	
	@Schema(description = "是否admin端路由（false ui, true admin）")
	@TableField("is_admin")
	private Boolean isAdmin;
	
	@Schema(description = "类型 true导航栏，false普通路由")
	@TableField ("is_bar")
	private Boolean isBar;
	
	@Schema(description = "父路由ID")
	@TableField("parent_id")
	private Long parentId;
	
	@Schema(description = "是否外链")
	@TableField("is_frame")
	private Boolean isFrame;
	
	@Schema(description = "路由地址")
	@TableField("path")
	private String path;
	
	@Schema(description = "路由前缀图标")
	@TableField("icon")
	private String icon;
	
	@Schema(description = "路由组件路径")
	@TableField("component")
	private String component;
	
	@Schema(description = "状态 1 启用")
	@TableField("status")
	private Boolean status;
}
